<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <script type="text/javascript">
        var phoneWidth=parseInt(window.screen.width),phoneScale=phoneWidth/750,ua=navigator.userAgent;if(/Android (\d+\.\d+)/.test(ua)){var version=parseFloat(RegExp.$1);2.3<version?document.write('<meta name="viewport" content="width=750, minimum-scale = '+phoneScale+", maximum-scale = "+phoneScale+', target-densitydpi=device-dpi">'):document.write('<meta name="viewport" content="width=750, target-densitydpi=device-dpi">')}else document.write('<meta name="viewport" content="width=750, user-scalable=no, target-densitydpi=device-dpi">');
    </script>
    <link rel="stylesheet" href="lib/light.css" type="text/css">
    <link rel="stylesheet" href="lib/sweetalert.css">
    <script src="js/zepto.js" type="text/javascript"></script>
    <script src="js/zepto-cookie.min.js" type="text/javascript"></script>
    <script src="js/common.js" type="text/javascript"></script>
    <script src="lib/sweetalert-dev.js" type="text/javascript"></script>
    <title>充值记录</title>
</head>
<body class="grayback">
<div class="recharge Wrap" id="">


    <h2>一月</h2>
    <ul class="listCon">
        <li class="list clearfix">
            <div class="buleback pull-left">
                <p class="week">周三</p>
                <p class="day">04-10</p>
            </div>
            <div class="pull-left res">
                <i class="iconfont lt">&#xe608;</i>
                <div class="cashRe">
                    <p>充值话费30元</p>
                    <h4>充值号码：1500011414</h4>
                </div>
            </div>
            <div class="suc pull-left">
                <p class="gray">
                    充值失败
                </p>
            </div>
        </li>
        <li class="list clearfix">
            <div class="buleback pull-left">
                <p class="week">周三</p>
                <p class="day">04-10</p>
            </div>
            <div class="pull-left res">
                <i class="iconfont">&#xe608;</i>
                <div class="cashRe">
                    <p>充值话费30元</p>
                    <h4>充值号码：1500011414</h4>
                </div>
            </div>
            <div class="suc pull-left">
                <p class="gray">
                    充值失败
                </p>
            </div>
        </li>
        <li class="list clearfix">
            <div class="buleback pull-left">
                <p class="week">周三</p>
                <p class="day">04-10</p>
            </div>
            <div class="pull-left res">
                <i class="iconfont">&#xe608;</i>
                <div class="cashRe">
                    <p>充值话费30元</p>
                    <h4>充值号码：1500011414</h4>
                </div>
            </div>
            <div class="suc pull-left">
                <p class="green">
                    充值成功
                </p>
            </div>
        </li>
    </ul>
    <a class="base-btn loginout">
        退出登录
    </a>
</div>
<script type="text/javascript">
    var re={};
    re.logout = $('.loginout');

    if($.fn.cookie('phone') != null){
        $.ajax({
            url:url+'/recharge_record.json',
            type:'post',
            data:{
                phoneNum: $.fn.cookie('phone')//不登录通过手机号码来判断充值记录，目测可行
            },
            success:function(xrh){
                console.log(xrh.list.length);
                var pic = template('dataIn',xrh);
                $('.loginout').before(pic)
            }
        })
    }//通过cookie判断登录与否

    re.logout.bind('click',function(){
        console.log($.fn.cookie('phone'));
        $.fn.cookie('phone',{path:'/',expires:-1});
        $.fn.cookie('phone',{expires:-1});
       window.location.href='../lightstar/login.html'
    })
</script>
</body>
</html>